package com.jh.readme.iu.fragment.newslist.ViewHolder;

import android.content.Context;
import android.view.View;

import com.jh.readme.R;
import com.jh.tools.base.BaseViewHolder;
import com.jh.tools.bean.NeteastNewsSummary;
import com.jh.tools.common.ImagUtil;

/**
 * Created by niejiahuan on 16/6/20.
 *  新闻列表绑定器
 */
public class NewsListVH extends BaseViewHolder<NeteastNewsSummary> {

    public NewsListVH(View v) {
        super(v);
    }

    @Override
    public int getType() {
        return R.layout.item_news_summary;
    }
    @Override
    public void onBindViewHolder(View view, NeteastNewsSummary obj) {

        getTextView(R.id.tv_news_summary_title).setText(obj.title);
        getTextView(R.id.tv_news_summary_digest).setText(obj.digest);
        getTextView(R.id.tv_news_summary_ptime).setText(obj.ptime);
        ImagUtil.getInstance().getImageLoader(obj.imgsrc,getImageView(R.id.iv_news_summary_photo));

    }

}
